package com.ayz.gateway.api.server;

import static io.grpc.MethodDescriptor.generateFullMethodName;

/**
 */
@javax.annotation.Generated(
    value = "by gRPC proto compiler (version 1.52.1)",
    comments = "Source: gateway_registeGatewayService.proto")
@io.grpc.stub.annotations.GrpcGenerated
public final class RegistryGatewayServiceGrpc {

  private RegistryGatewayServiceGrpc() {}

  public static final String SERVICE_NAME = "RegistryGatewayService";

  // Static method descriptors that strictly reflect the proto.
  private static volatile io.grpc.MethodDescriptor<com.ayz.gateway.api.request.RegistryGatewayServiceProto.RegistryGatewayServiceRequest,
      com.ayz.gateway.api.response.GatewayCommonResult.GatewayResult> getRegistryGatewayServiceMethod;

  @io.grpc.stub.annotations.RpcMethod(
      fullMethodName = SERVICE_NAME + '/' + "registryGatewayService",
      requestType = com.ayz.gateway.api.request.RegistryGatewayServiceProto.RegistryGatewayServiceRequest.class,
      responseType = com.ayz.gateway.api.response.GatewayCommonResult.GatewayResult.class,
      methodType = io.grpc.MethodDescriptor.MethodType.UNARY)
  public static io.grpc.MethodDescriptor<com.ayz.gateway.api.request.RegistryGatewayServiceProto.RegistryGatewayServiceRequest,
      com.ayz.gateway.api.response.GatewayCommonResult.GatewayResult> getRegistryGatewayServiceMethod() {
    io.grpc.MethodDescriptor<com.ayz.gateway.api.request.RegistryGatewayServiceProto.RegistryGatewayServiceRequest, com.ayz.gateway.api.response.GatewayCommonResult.GatewayResult> getRegistryGatewayServiceMethod;
    if ((getRegistryGatewayServiceMethod = RegistryGatewayServiceGrpc.getRegistryGatewayServiceMethod) == null) {
      synchronized (RegistryGatewayServiceGrpc.class) {
        if ((getRegistryGatewayServiceMethod = RegistryGatewayServiceGrpc.getRegistryGatewayServiceMethod) == null) {
          RegistryGatewayServiceGrpc.getRegistryGatewayServiceMethod = getRegistryGatewayServiceMethod =
              io.grpc.MethodDescriptor.<com.ayz.gateway.api.request.RegistryGatewayServiceProto.RegistryGatewayServiceRequest, com.ayz.gateway.api.response.GatewayCommonResult.GatewayResult>newBuilder()
              .setType(io.grpc.MethodDescriptor.MethodType.UNARY)
              .setFullMethodName(generateFullMethodName(SERVICE_NAME, "registryGatewayService"))
              .setSampledToLocalTracing(true)
              .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
                  com.ayz.gateway.api.request.RegistryGatewayServiceProto.RegistryGatewayServiceRequest.getDefaultInstance()))
              .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
                  com.ayz.gateway.api.response.GatewayCommonResult.GatewayResult.getDefaultInstance()))
              .setSchemaDescriptor(new RegistryGatewayServiceMethodDescriptorSupplier("registryGatewayService"))
              .build();
        }
      }
    }
    return getRegistryGatewayServiceMethod;
  }

  /**
   * Creates a new async stub that supports all call types for the service
   */
  public static RegistryGatewayServiceStub newStub(io.grpc.Channel channel) {
    io.grpc.stub.AbstractStub.StubFactory<RegistryGatewayServiceStub> factory =
      new io.grpc.stub.AbstractStub.StubFactory<RegistryGatewayServiceStub>() {
        @Override
        public RegistryGatewayServiceStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
          return new RegistryGatewayServiceStub(channel, callOptions);
        }
      };
    return RegistryGatewayServiceStub.newStub(factory, channel);
  }

  /**
   * Creates a new blocking-style stub that supports unary and streaming output calls on the service
   */
  public static RegistryGatewayServiceBlockingStub newBlockingStub(
      io.grpc.Channel channel) {
    io.grpc.stub.AbstractStub.StubFactory<RegistryGatewayServiceBlockingStub> factory =
      new io.grpc.stub.AbstractStub.StubFactory<RegistryGatewayServiceBlockingStub>() {
        @Override
        public RegistryGatewayServiceBlockingStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
          return new RegistryGatewayServiceBlockingStub(channel, callOptions);
        }
      };
    return RegistryGatewayServiceBlockingStub.newStub(factory, channel);
  }

  /**
   * Creates a new ListenableFuture-style stub that supports unary calls on the service
   */
  public static RegistryGatewayServiceFutureStub newFutureStub(
      io.grpc.Channel channel) {
    io.grpc.stub.AbstractStub.StubFactory<RegistryGatewayServiceFutureStub> factory =
      new io.grpc.stub.AbstractStub.StubFactory<RegistryGatewayServiceFutureStub>() {
        @Override
        public RegistryGatewayServiceFutureStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
          return new RegistryGatewayServiceFutureStub(channel, callOptions);
        }
      };
    return RegistryGatewayServiceFutureStub.newStub(factory, channel);
  }

  /**
   */
  public static abstract class RegistryGatewayServiceImplBase implements io.grpc.BindableService {

    /**
     */
    public void registryGatewayService(com.ayz.gateway.api.request.RegistryGatewayServiceProto.RegistryGatewayServiceRequest request,
        io.grpc.stub.StreamObserver<com.ayz.gateway.api.response.GatewayCommonResult.GatewayResult> responseObserver) {
      io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getRegistryGatewayServiceMethod(), responseObserver);
    }

    @Override public final io.grpc.ServerServiceDefinition bindService() {
      return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor())
          .addMethod(
            getRegistryGatewayServiceMethod(),
            io.grpc.stub.ServerCalls.asyncUnaryCall(
              new MethodHandlers<
                com.ayz.gateway.api.request.RegistryGatewayServiceProto.RegistryGatewayServiceRequest,
                com.ayz.gateway.api.response.GatewayCommonResult.GatewayResult>(
                  this, METHODID_REGISTRY_GATEWAY_SERVICE)))
          .build();
    }
  }

  /**
   */
  public static final class RegistryGatewayServiceStub extends io.grpc.stub.AbstractAsyncStub<RegistryGatewayServiceStub> {
    private RegistryGatewayServiceStub(
        io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
      super(channel, callOptions);
    }

    @Override
    protected RegistryGatewayServiceStub build(
        io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
      return new RegistryGatewayServiceStub(channel, callOptions);
    }

    /**
     */
    public void registryGatewayService(com.ayz.gateway.api.request.RegistryGatewayServiceProto.RegistryGatewayServiceRequest request,
        io.grpc.stub.StreamObserver<com.ayz.gateway.api.response.GatewayCommonResult.GatewayResult> responseObserver) {
      io.grpc.stub.ClientCalls.asyncUnaryCall(
          getChannel().newCall(getRegistryGatewayServiceMethod(), getCallOptions()), request, responseObserver);
    }
  }

  /**
   */
  public static final class RegistryGatewayServiceBlockingStub extends io.grpc.stub.AbstractBlockingStub<RegistryGatewayServiceBlockingStub> {
    private RegistryGatewayServiceBlockingStub(
        io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
      super(channel, callOptions);
    }

    @Override
    protected RegistryGatewayServiceBlockingStub build(
        io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
      return new RegistryGatewayServiceBlockingStub(channel, callOptions);
    }

    /**
     */
    public com.ayz.gateway.api.response.GatewayCommonResult.GatewayResult registryGatewayService(com.ayz.gateway.api.request.RegistryGatewayServiceProto.RegistryGatewayServiceRequest request) {
      return io.grpc.stub.ClientCalls.blockingUnaryCall(
          getChannel(), getRegistryGatewayServiceMethod(), getCallOptions(), request);
    }
  }

  /**
   */
  public static final class RegistryGatewayServiceFutureStub extends io.grpc.stub.AbstractFutureStub<RegistryGatewayServiceFutureStub> {
    private RegistryGatewayServiceFutureStub(
        io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
      super(channel, callOptions);
    }

    @Override
    protected RegistryGatewayServiceFutureStub build(
        io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
      return new RegistryGatewayServiceFutureStub(channel, callOptions);
    }

    /**
     */
    public com.google.common.util.concurrent.ListenableFuture<com.ayz.gateway.api.response.GatewayCommonResult.GatewayResult> registryGatewayService(
        com.ayz.gateway.api.request.RegistryGatewayServiceProto.RegistryGatewayServiceRequest request) {
      return io.grpc.stub.ClientCalls.futureUnaryCall(
          getChannel().newCall(getRegistryGatewayServiceMethod(), getCallOptions()), request);
    }
  }

  private static final int METHODID_REGISTRY_GATEWAY_SERVICE = 0;

  private static final class MethodHandlers<Req, Resp> implements
      io.grpc.stub.ServerCalls.UnaryMethod<Req, Resp>,
      io.grpc.stub.ServerCalls.ServerStreamingMethod<Req, Resp>,
      io.grpc.stub.ServerCalls.ClientStreamingMethod<Req, Resp>,
      io.grpc.stub.ServerCalls.BidiStreamingMethod<Req, Resp> {
    private final RegistryGatewayServiceImplBase serviceImpl;
    private final int methodId;

    MethodHandlers(RegistryGatewayServiceImplBase serviceImpl, int methodId) {
      this.serviceImpl = serviceImpl;
      this.methodId = methodId;
    }

    @Override
    @SuppressWarnings("unchecked")
    public void invoke(Req request, io.grpc.stub.StreamObserver<Resp> responseObserver) {
      switch (methodId) {
        case METHODID_REGISTRY_GATEWAY_SERVICE:
          serviceImpl.registryGatewayService((com.ayz.gateway.api.request.RegistryGatewayServiceProto.RegistryGatewayServiceRequest) request,
              (io.grpc.stub.StreamObserver<com.ayz.gateway.api.response.GatewayCommonResult.GatewayResult>) responseObserver);
          break;
        default:
          throw new AssertionError();
      }
    }

    @Override
    @SuppressWarnings("unchecked")
    public io.grpc.stub.StreamObserver<Req> invoke(
        io.grpc.stub.StreamObserver<Resp> responseObserver) {
      switch (methodId) {
        default:
          throw new AssertionError();
      }
    }
  }

  private static abstract class RegistryGatewayServiceBaseDescriptorSupplier
      implements io.grpc.protobuf.ProtoFileDescriptorSupplier, io.grpc.protobuf.ProtoServiceDescriptorSupplier {
    RegistryGatewayServiceBaseDescriptorSupplier() {}

    @Override
    public com.google.protobuf.Descriptors.FileDescriptor getFileDescriptor() {
      return com.ayz.gateway.api.request.RegistryGatewayServiceProto.getDescriptor();
    }

    @Override
    public com.google.protobuf.Descriptors.ServiceDescriptor getServiceDescriptor() {
      return getFileDescriptor().findServiceByName("RegistryGatewayService");
    }
  }

  private static final class RegistryGatewayServiceFileDescriptorSupplier
      extends RegistryGatewayServiceBaseDescriptorSupplier {
    RegistryGatewayServiceFileDescriptorSupplier() {}
  }

  private static final class RegistryGatewayServiceMethodDescriptorSupplier
      extends RegistryGatewayServiceBaseDescriptorSupplier
      implements io.grpc.protobuf.ProtoMethodDescriptorSupplier {
    private final String methodName;

    RegistryGatewayServiceMethodDescriptorSupplier(String methodName) {
      this.methodName = methodName;
    }

    @Override
    public com.google.protobuf.Descriptors.MethodDescriptor getMethodDescriptor() {
      return getServiceDescriptor().findMethodByName(methodName);
    }
  }

  private static volatile io.grpc.ServiceDescriptor serviceDescriptor;

  public static io.grpc.ServiceDescriptor getServiceDescriptor() {
    io.grpc.ServiceDescriptor result = serviceDescriptor;
    if (result == null) {
      synchronized (RegistryGatewayServiceGrpc.class) {
        result = serviceDescriptor;
        if (result == null) {
          serviceDescriptor = result = io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME)
              .setSchemaDescriptor(new RegistryGatewayServiceFileDescriptorSupplier())
              .addMethod(getRegistryGatewayServiceMethod())
              .build();
        }
      }
    }
    return result;
  }
}
